package com.android.hq.ganktoutiao.ui.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.android.hq.ganktoutiao.R;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by Administrator on 2017/5/12.
 */
public class HuanYingActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fnegmian);

        final Intent it = new Intent(this, MainActivity.class); //你要转向的Activity
        Timer timer = new Timer();
        TimerTask task = new TimerTask() {
            @Override
            public void run() {
                startActivity(it); //执行
            }
        };
        timer.schedule(task, 1000 * 3); //3秒后
    }

    @Override
    protected void onPause() {
        super.onPause();
        finish();
    }
}
